package com.gosophia.conferenceManagement.confPreparation.service;

import java.util.List;

import com.gosophia.commons.exception.BusinessException;
import com.gosophia.conferenceManagement.common.entity.Document;
import com.gosophia.conferenceManagement.confPreparation.entity.NotificationFeedbackList;
import com.gosophia.conferenceManagement.confPreparation.entity.ParticipatingNameList;
import com.gosophia.userManagement.entity.UserInfo;

/**
 * 会务管理接口
 * @author wangxinbing
 * @since  2011-3-22
 *  Copyright (c) 2010 Gosophia corporation All Rights Reserved
 */
public interface ConfPreparationService {
    /**
     * 发送正式通知时，找到对应的会务管理Job 调用此方法添加反馈通知单，初始反馈状态为ifAttend = 
     *    NotificationFeedbackList.IfAttend.IfAttend.IFATTEND_NONE
     * @param jobId 会务管理JobId
     * @param userInfoList 发送时的用户列表
     * @throws BusinessException
     */
	public void addNotificationFeedbackList(Long jobId, List<UserInfo> userInfoList) throws BusinessException;
	/**
	 * 用户反馈时调用此方法更新反馈状态 ：参会ifAttend= NotificationFeedbackList.IfAttend.IfAttend.IFATTEND_YES
	 * 不参会ifAttend= NotificationFeedbackList.IfAttend.IfAttend.IFATTEND_NO
	 * @param jobId 会务管理JobId
	 * @param userInfoId 反馈的用户id 不能为空
	 * @param ifAttend 是否参会 yes /no/none
	 * @throws BusinessException
	 */
	public void updateNotificationFeedbackList(Long jobId, Long userInfoId,String ifAttend) throws BusinessException;
	/**
	 * 通过会务管理jobId查询出反馈通知单列表
	 * @param jobId 会务管理JobId
	 * @return 返回通知单列表
	 */
    public List<NotificationFeedbackList> findNotificationFeedbackListsByJobId(Long jobId);
    /**
     * 修改会务管理Job的参会名单
     * @param jobId 会务管理JobId 不能为空
     * @param participatingNameLists 参会名单列表
     * @throws BusinessException
     */
	public void updateParticipatingNameList(Long jobId, List<ParticipatingNameList> participatingNameLists) throws BusinessException;
	/**
	 * 通过会务管理jobId查询参会名单列表
	 * @param jobId 会务管理jobId 不能为空
	 * @return 参会名单列表
	 */
    public List<ParticipatingNameList> findParticipatingNameListsByJobId(Long jobId);
    /**
     * 通过会务管理jobId查询会议议程
     * @param jobId 会务管理jobId不能为null
     * @return 返回会议议程文档实体
     * @throws BusinessException
     */
    public Document findAgendaByJobId(Long jobId) throws BusinessException;
    /**
     * 通过会务管理jobId查询会议材料
     * @param jobId 会务管理jobId不能为null
     * @return 返回会议材料列表
     * @throws BusinessException
     */
    public List<Document> findMaterialsByJobId(Long jobId) throws BusinessException;
    /**
     * 通过会务管理jobId查询会议签到表
     * @param jobId 会务管理jobId不能为null
     * @return 返回会议签到表
     * @throws BusinessException
     */
    public Document findSignTableByJodId(Long jobId) throws BusinessException;
    /**
     * 设置会议材料
     * @param jobId jobId不能为null
     * @param materials 会议材料
     * @throws BusinessException
     */
	public void updateConfMaterials(Long jobId, List<Document> materials) throws BusinessException;
	/**
	 * 更新签到表
	 * @param jobId 不能为null
	 * @param doc
	 * @return Document
	 */
	public Document updateAgenda(Long jobId, Document doc) throws BusinessException;
	/**
	 * 更新会议议程
	 * @param jobId 不能为null
	 * @param docDTO
	 * @return Document
	 */
	public Document updateSignTable(Long jobId, Document doc) throws BusinessException;
	/**
	 * 完成会务准备
	 * @param jobId jobId不能为null
	 * @param operatorId 不能为null
	 */
	public void accomplishConferencePrepare(Long jobId,Long operatorId,String confPrepareType) throws BusinessException;
	/**
	 *判断是否已经反馈
	 */
	public boolean ifFeedBacked(Long jobId, Long userInfoId);
	/**
	 * 根据公文Id删除该文件
	 * @param documentId 不能为null
	 * @param jobId 不能为null
	 */
	public void deleteConfPMetailBydocId(Long documentId,Long jobId) throws BusinessException;
}
